import 'package:date_format/date_format.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ProductWorkreportrecordScreenDetial extends StatefulWidget{

  final String? title;

  //今日产量
  final num? dailyOutput;

  //月绩效工资
  final num? monthlyPay;

  //月累计产量
  final num? monthlyOutput;

  const ProductWorkreportrecordScreenDetial({
    Key? key,
    required this.title,
    required this.dailyOutput,
    required this.monthlyOutput,
    required this.monthlyPay
  }) : super(key: key);

  _ProductWorkreportrecordScreenDetialState createState() => _ProductWorkreportrecordScreenDetialState();
}

class _ProductWorkreportrecordScreenDetialState extends State<ProductWorkreportrecordScreenDetial> {

  @override
  Widget build(BuildContext context) {

    // TODO: implement build
    return Padding(padding: EdgeInsets.all(10.r),child: Card(
        clipBehavior: Clip.antiAlias,
        elevation: 1.0,
        color: Colors.white10,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Container(
              color: Colors.blueAccent,
              child: Padding(
                padding: EdgeInsets.fromLTRB(50.w, 2.h, 50.w, 2.h),
                child: Text(widget.title!,style: TextStyle(
                    fontSize: 22.sp,
                    decoration: TextDecoration.none,
                    color: Color.fromRGBO(255, 255, 255, 1)
                ),),
              ),
            ),
            // SizedBox(height: 50.h,),
            Expanded(child: Row(
              children: [
                Expanded(child: Padding(padding: EdgeInsets.all(10.r),child: Card(
                  clipBehavior: Clip.antiAlias,
                  elevation: 1.0,
                  color: Colors.white10,
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text("今日产量",style: TextStyle(
                          fontSize: 15.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                      Text(widget.dailyOutput.toString(),style: TextStyle(
                          fontSize: 22.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                    ],
                  ),
                ),)),
                Expanded(child: Padding(padding: EdgeInsets.all(10.r),child: Card(
                  clipBehavior: Clip.antiAlias,
                  elevation: 1.0,
                  color: Colors.white10,
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text("月累计产量",style: TextStyle(
                          fontSize: 15.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                      Text(widget.monthlyOutput.toString(),style: TextStyle(
                          fontSize: 22.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                    ],
                  ),),
                ),),
                Expanded(child: Padding(padding: EdgeInsets.all(10.r),child: Card(
                  clipBehavior: Clip.antiAlias,
                  elevation: 1.0,
                  color: Colors.white10,
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Text("月绩效工资(元)",style: TextStyle(
                          fontSize: 15.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                      Text(widget.monthlyPay.toString(),style: TextStyle(
                          fontSize: 22.sp,
                          decoration: TextDecoration.none,
                          color: Color.fromRGBO(255, 255, 255, 1)
                      ),),
                    ],
                  ),),
                ),),

              ],
            )),
          ],
        )
    ),);
  }
}